package testcase;

import org.junit.Test;

import views.ExamplesSelectInputsView;
import annotations.Browser;
import annotations.EntryPoint;
import core.BaseTestCase;
import enums.Browsers;

@EntryPoint("SelectInputs.html")
@Browser(Browsers.Firefox)
public class SelectInputTests extends BaseTestCase {

	@Test
	public void testSelectInputSelectById() {
		ExamplesSelectInputsView examplesSelectInputsView = new ExamplesSelectInputsView();

		for (int idx = 0; idx < 4; idx++) {
			examplesSelectInputsView.carsSelectInput.select(idx);
			examplesSelectInputsView.carsSelectInput.isSelected(idx);
		}

	}
	
	@Test
	public void testSelectInputSelectByValue() {
		ExamplesSelectInputsView examplesSelectInputsView = new ExamplesSelectInputsView();
		
		String[] options = {"Volvo", "Saab", "Fiat", "Audi"};

		for (int idx = 0; idx < 4; idx++) {
			examplesSelectInputsView.carsSelectInput.select(options[idx]);
			examplesSelectInputsView.carsSelectInput.isSelected(options[idx]);
		}

	}

}
